package com.hpjpw.idoapp.controller;

import com.hpjpw.ido.domain.Enterprise;
import com.hpjpw.ido.service.IEnterpriseService;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @BelongsProject: RuoYi-IDo
 * @BelongsPackage: com.hpjpw.idoapp.controller
 * @Author: hpj
 * @CreateTime: 2021-01-08 20:40
 * @Description: IDo企业信息类
 */
@RestController
@RequestMapping("/ido/app/enterprise")
public class IDoEnterpriseController extends BaseController {

    @Autowired
    private IEnterpriseService enterpriseService;

    /**
     * 查询企业列表
     */
    @GetMapping("/list")
    @ApiOperation("查询企业列表")
    public TableDataInfo list(Enterprise enterprise) {
        startPage();
        List<Enterprise> list = enterpriseService.selectEnterpriseList(enterprise);
        for (Enterprise item : list) {
            item.setCode("");
        }
        return getDataTable(list);
    }
}
